<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>sim.generateTimeOptimalTrajectory</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1>Regular API function</h1>
<h3 class=subsectionBar><a name="simGenerateTimeOptimalTrajectory" id="simGenerateTimeOptimalTrajectory"></a>sim.generateTimeOptimalTrajectory</h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Generates a time optimal trajectory, based on the TOPPRA library. See also the other <a href="../apiFunctions.htm#paths">path related functions</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn><div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div></div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div></div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>table[] outputPath,table[] times=sim.generateTimeOptimalTrajectory(table[] path,table[] pathLengths,table[] minMaxVel,table[] minMaxAccel,int trajPtSamples=1000,string boundaryCondition='not-a-knot',float timeout=5)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>path</strong>: the path, specified in row-major order, e.g. a path containing two 3D positions  would be {x1,y1,z1,x2,y2,z2}</div>
<div><strong>pathLengths</strong>: the lengths of a path. Each path point should have a corresponding length value (as the distance from the path's first point, along the path). See also <a href="simGetPathLengths.htm">sim.getPathLengths</a>.</div>
<div><strong>minMaxVel</strong>: the minimum and maximum allowed velocity, for each dimension/axis, e.g. {xmin,xmax,ymin,ymax,zmin,zmax}</div>
<div><strong>minMaxAccel</strong>: the minimum and maximum allowed acceleration, for each dimension/axis, e.g. {xmin,xmax,ymin,ymax,zmin,zmax}</div>
<div><strong>trajPtSamples</strong>: the desired number of path points/configurations</div>
<div><strong>boundaryCondition</strong>: the boundary condition</div>
<div><strong>timeout</strong>: a timeout duration</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>outputPath</strong>: the generated path</div>
</td> 
</tr> 
</table> 


<br>
</td>
</tr>
</table>
</div>
</body>
</html>
